package com.cc.user.feign;

import com.cc.common.utils.R;
import com.cc.common.utils.ResponseData;
import com.cc.user.vo.OfflineOrderEntity;
import com.cc.user.vo.OrderVo;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

import javax.servlet.http.HttpSession;
import java.util.List;

@FeignClient("cc-mall")
public interface MallFeign {

    @PostMapping("/mall/offlineorder/update")
    public R update(@RequestBody OfflineOrderEntity offlineOrder);

    @PostMapping("/mall/getOrder")
    public ResponseData<List<OrderVo>> getOrderByUid(@RequestParam(value = "status",required = false) Integer status,
                                                      HttpSession session);

    @GetMapping("/mall/offlineorder/getOfflineOrderByCid/{cid}")
    public R getOfflineOrderByCid(@PathVariable("cid") Long cid);

    @GetMapping("/mall/offlineorder/info/{id}")
    public R info(@PathVariable("id") Long id);

}
